home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: 13 April 1997
- // Author: gf
- //
- //
- // Procedure Name:
- // ModCurveSurfacesMenu
- //
- // Description:
- // Create the MODELLING->CurveSurfaces menu
- //
- // Input Arguments:
- // parent to parent the menu to.
- //
- // Return Value:
- // None.
- //
-
- proc modCreateSurfacesMenuLabels()
- {
- if( `optionVar -q modelWithToolRevolve` ) {
- menuItem -e
- -l "Revolve Tool"
- -annotation ("Revolve Tool: Select " +
- "curve(s), isoparm(s) or trim edge(s)")
- surfRevolveItem;
- menuItem -e
- -annotation ("Revolve Tool Option Box")
- -l ("Revolve Tool Option Box")
- revolveDialogItem;
- }
- else {
- menuItem -e
- -l "Revolve"
- -annotation ("Revolve: Select " +
- "curve(s), isoparm(s) or trim edge(s)")
- surfRevolveItem;
- menuItem -e
- -annotation ("Revolve Option Box")
- -l ("Revolve Option Box")
- revolveDialogItem;
- }
-
- if( `optionVar -q modelWithToolLoft` ) {
- menuItem -e
- -l "Loft Tool"
- -annotation ("Loft Tool: Select curve(s), " +
- "isoparm(s) or trim edge(s)")
- surfLoftItem;
- menuItem -e
- -annotation ("Loft Tool Option Box")
- -l ("Loft Tool Option Box")
- loftDialogItem;
- }
- else {
- menuItem -e
- -l "Loft"
- -annotation ("Loft: Select curve(s), " +
- "isoparm(s) or trim edge(s)")
- surfLoftItem;
- menuItem -e
- -annotation ("Loft Option Box")
- -l ("Loft Option Box")
- loftDialogItem;
- }
-
- if( `optionVar -q modelWithToolExtrude` ) {
- menuItem -e
- -l "Extrude Tool"
- -annotation ("Extrude Tool: Select curve(s), " +
- "isoparm(s) or trim edge(s). Select the path last.")
- surfExtrudeItem;
- menuItem -e
- -annotation ("Extrude Tool Option Box")
- -l ("Extrude Tool Option Box")
- extrudeDialogItem;
- }
- else {
- menuItem -e
- -l "Extrude"
- -annotation ("Extrude: Select curve(s), " +
- "isoparm(s) or trim edge(s). Select the path last.")
- surfExtrudeItem;
- menuItem -e
- -annotation ("Extrude Option Box")
- -l ("Extrude Option Box")
- extrudeDialogItem;
- }
-
- if( `optionVar -q modelWithToolBoundary` ) {
- menuItem -e
- -l "Boundary Tool"
- -annotation ("Boundary Tool: Select 3 or 4 " +
- "curves, isoparms or trim edges")
- surfBoundaryItem;
- menuItem -e
- -annotation ("Boundary Tool Option Box")
- -l ("Boundary Tool Option Box")
- boundaryDialogItem;
- }
- else {
- menuItem -e
- -l "Boundary"
- -annotation ("Boundary: Select 3 or 4 " +
- "curves, isoparms or trim edges")
- surfBoundaryItem;
- menuItem -e
- -annotation ("Boundary Option Box")
- -l ("Boundary Option Box")
- boundaryDialogItem;
- }
-
- if( `licenseCheck -m edit -type model` ) {
- if( `optionVar -q modelWithToolSquareSrf` ) {
- menuItem -e
- -l "Square Tool"
- -annotation ("Square Surface Tool" +
- ": Select 3 or 4 curves, isoparms or trim edges " +
- "(order of selection is important)" )
- surfSquareItem;
- menuItem -e
- -annotation ("Square Surface Tool Option Box")
- -l ("Square Surface Tool Option Box")
- squareDialogItem;
- }
- else {
- menuItem -e
- -l "Square"
- -annotation ("Square Surface" +
- ": Select 3 or 4 curves, isoparms or trim edges " +
- "(order of selection is important)" )
- surfSquareItem;
- menuItem -e
- -annotation ("Square Surface Option Box")
- -l ("Square Surface Option Box")
- squareDialogItem;
- }
- }
-
- if( `optionVar -q modelWithToolBevel` ) {
- menuItem -e
- -l "Bevel Tool"
- -annotation ("Bevel Tool: Select curve(s), isoparm(s) " +
- "or trim edge(s) or CoS")
- surfBevelItem;
- menuItem -e
- -annotation "Bevel Tool Option Box"
- -l "Bevel Tool Option Box"
- bevelDialogItem;
- }
- else {
- menuItem -e
- -l "Bevel"
- -annotation ("Bevel: Select curve(s), isoparm(s) " +
- "or trim edge(s) or CoS")
- surfBevelItem;
- menuItem -e
- -annotation "Bevel Option Box"
- -l "Bevel Option Box"
- bevelDialogItem;
- }
-
- if( `optionVar -q modelWithToolBevelPlus` ) {
- menuItem -e
- -l "Bevel Plus Tool"
- -annotation ("Bevel Plus Tool: Select curve(s), isoparm(s) " +
- "or trim edge(s) or CoS")
- surfBevelPlusItem;
- menuItem -e
- -annotation "Bevel Plus Tool Option Box"
- -l "Bevel Plus Tool Option Box"
- bevelPlusDialogItem;
- }
- else {
- menuItem -e
- -l "Bevel Plus"
- -annotation ("Bevel Plus: Select curve(s), isoparm(s) " +
- "or trim edge(s) or CoS")
- surfBevelPlusItem;
- menuItem -e
- -annotation "Bevel Plus Option Box"
- -l "Bevel Plus Option Box"
- bevelPlusDialogItem;
- }
-
- if( `optionVar -q modelWithToolPlanar` ) {
- menuItem -e
- -l "Planar Tool"
- -annotation ("Planar Tool: Select curve(s), isoparm(s) or " +
- "trim edge(s) (that together form one or more " +
- "closed regions)")
- planarTrimItem;
- menuItem -e
- -annotation "Planar Tool Option Box"
- -l "Planar Tool Option Box"
- planerTrimDialogItem;
- }
- else {
- menuItem -e
- -l "Planar"
- -annotation ("Planar: Select curve(s), isoparm(s) or " +
- "trim edge(s) (that together form one or more " +
- "closed regions)")
- planarTrimItem;
- menuItem -e
- -annotation "Planar Option Box"
- -l "Planar Option Box"
- planerTrimDialogItem;
- }
- }
-
- global proc ModCreateSurfacesMenu( string $parent )
- {
- // If this ever changes to true, we have to make sure
- // we don't dim the tools. So, don't just change the
- // value. Milan S.
- int $dimWhenNoSelect = 0;
-
- setParent -m $parent;
- if( `menu -q -ni $parent` != 0 ) {
- //
- // Menu is built already - relabel and return
- //
- modCreateSurfacesMenuLabels();
- return;
- }
-
- // revolve + loft + planar.
- //
- menuItem
- -c "Revolve"
- -dmc "revolveToolScript 2"
- -i "revolve.xpm"
- surfRevolveItem;
- menuItem -optionBox true
- -c "RevolveOptions"
- -i "revolve.xpm"
- revolveDialogItem;
- if( $dimWhenNoSelect )
- dimWhen -f "SomethingSelected" ($parent+"|surfRevolveItem") ;
-
- menuItem
- -c "Loft"
- -dmc "loftToolScript 2"
- -i "skin.xpm"
- surfLoftItem;
- menuItem -optionBox true
- -c "LoftOptions"
- -i "skin.xpm"
- loftDialogItem;
- if( $dimWhenNoSelect )
- dimWhen -f "SomethingSelected" ($parent+"|surfLoftItem") ;
-
- menuItem
- -c "Planar"
- -dmc "planarToolScript 2"
- -i "planarTrim.xpm"
- planarTrimItem;
- menuItem -optionBox true -i "planarTrim.xpm"
- -c "PlanarOptions"
- planerTrimDialogItem;
-
- menuItem -d true ;
-
- // extrude and Birail
- //
- menuItem
- -c "Extrude"
- -dmc "extrudeToolScript 2"
- -i "extrude.xpm"
- surfExtrudeItem;
- menuItem -optionBox true
- -c "ExtrudeOptions"
- -i "extrude.xpm"
- extrudeDialogItem;
- if( $dimWhenNoSelect )
- dimWhen -f "SomethingSelected" ($parent+"|surfExtrudeItem") ;
-
- menuItem -l "Birail" -sm 1 -to 1 -aob true;
-
- menuItem -l "Birail 1 Tool"
- -c "Birail1"
- -dmc "birailToolScript 2 1"
- -annotation ("Birail 1 Tool: Select curve(s), " +
- "isoparm(s) or trim edge(s)")
- -image "birail1Gen.xpm"
- spBirailItem;
- menuItem -optionBox true -image "birail1Gen.xpm"
- -annotation "Birail 1 Tool Option Box"
- -l "Birail 1 Tool Option Box"
- -c "Birail1Options"
- birail1ToolDialog;
-
- menuItem -l "Birail 2 Tool"
- -c "Birail2"
- -dmc "birailToolScript 2 2"
- -annotation ("Birail 2 Tool: Select curve(s), " +
- "isoparm(s) or trim edge(s)")
- -image "birail2Gen.xpm"
- dpBirailItem;
- menuItem -optionBox true -image "birail2Gen.xpm"
- -annotation "Birail 2 Tool Option Box"
- -l "Birail 2 Tool Option Box"
- -c "Birail2Options"
- birail2ToolDialog;
-
- menuItem -l "Birail 3+ Tool"
- -c "Birail3"
- -dmc "birailToolScript 2 3"
- -annotation ("Birail 3+ Tool: Select curve(s), " +
- "isoparm(s) or trim edge(s)")
- -image "birail3Gen.xpm"
- mpBirailItem;
- menuItem -optionBox true -image "birail3Gen.xpm"
- -annotation "Birail 3+ Tool Option Box"
- -l "Birail 3+ Tool Option Box"
- -c "Birail3Options"
- birail3ToolDialog;
- setParent -m .. ;
- menuItem -d true ;
-
- // boundary + Square.
- //
- menuItem
- -c "Boundary"
- -dmc "boundaryToolScript 2"
- -i "boundary.xpm"
- surfBoundaryItem;
- menuItem -optionBox true
- -c "BoundaryOptions"
- -i "boundary.xpm"
- boundaryDialogItem;
- if( $dimWhenNoSelect )
- dimWhen -f "SomethingSelected" ($parent+"|surfBoundaryItem") ;
-
- if( `licenseCheck -m edit -type model` ) {
- menuItem
- -c "SquareSurface"
- -dmc "squareSrfToolScript 2"
- -i "squareSrf.xpm"
- surfSquareItem;
- menuItem -optionBox true
- -c "SquareSurfaceOptions"
- -i "squareSrf.xpm"
- squareDialogItem;
- if( $dimWhenNoSelect )
- dimWhen -f "SomethingSelected" ($parent+"|surfSquareItem") ;
-
- menuItem -d true ;
- }
-
- // bevel.
- //
- menuItem -l "Bevel"
- -c "Bevel"
- -dmc "bevelToolScript 2"
- -i "bevel.xpm"
- surfBevelItem;
- menuItem -optionBox true
- -c "BevelOptions"
- -i "bevel.xpm"
- bevelDialogItem;
- if( $dimWhenNoSelect )
- dimWhen -f "SomethingSelected" ($parent+"|surfBevelItem") ;
-
- // bevel.
- //
- menuItem -l "Bevel Plus"
- -c "BevelPlus"
- -dmc "bevelPlusToolScript 2"
- -i "bevelPlus.xpm"
- surfBevelPlusItem;
- menuItem -optionBox true
- -c "BevelPlusOptions"
- -i "bevelPlus.xpm"
- bevelPlusDialogItem;
- if( $dimWhenNoSelect )
- dimWhen -f "SomethingSelected" ($parent+"|surfBevelPlusItem") ;
-
- modCreateSurfacesMenuLabels();
- }
-